<?php
require dirname(dirname(__DIR__)).'/includer.php';
$xssList = array(
<<<'EOF'
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";
EOF
,<<<'EOF'
alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--
EOF
,<<<'EOF'
></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
EOF
,<<<'EOF'
'';!--"<XSS>=&{()}
EOF
,<<<'EOF'
<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>
EOF
,'<script>alert(1);</script>',
);

?>
<h1>Xss过滤测试</h1>
<?php foreach($xssList as $xssString): ?>
    <span><?php eh($xssString);?></span><br/>
<?php endforeach; ?>

<?php foreach($xssList as $xssString): ?>
    <div data-id="<?php eh($xssList);?>"><?php eh($xssString);?></div><br/>
<?php endforeach; ?>

<script>
    var initData = <?php ejson($xssList);?>;
</script>

<?php foreach($xssList as $xssString): ?>
    <a href="http://127.0.0.1/?a=<?php eurlv($xssString)?>">测试连接</a><br/>
<?php endforeach; ?>